package com.demo.model;

import com.fasterxml.jackson.annotation.JsonView;

/**
 * @Auther: luobiao
 * @Date: 2020/6/11 07:02
 * @Description:
 */
public class JsonViewVo {

    @JsonView(Component1.class)
    private String field1;
    @JsonView(Component1.class)
    private String field2;
    @JsonView({Component1.class,Component2.class})
    private String field3;
    @JsonView(Component2.class)
    private String field4;
    public interface Component1{};
    public interface Component2{};

    public String getField1() {
        return field1;
    }

    public void setField1(String field1) {
        this.field1 = field1;
    }

    public String getField2() {
        return field2;
    }

    public void setField2(String field2) {
        this.field2 = field2;
    }

    public String getField3() {
        return field3;
    }

    public void setField3(String field3) {
        this.field3 = field3;
    }

    public String getField4() {
        return field4;
    }

    public void setField4(String field4) {
        this.field4 = field4;
    }

    @Override
    public String toString() {
        return "JsonViewVo{" +
                "field1='" + field1 + '\'' +
                ", field2='" + field2 + '\'' +
                ", field3='" + field3 + '\'' +
                ", field4='" + field4 + '\'' +
                '}';
    }
}

